﻿using System;
using System.Collections.Generic;

namespace yiCommerce.Core.Domain.Products
{
    public class ProductVariant:BaseEntity
    {
        public virtual string Name { get; set; }
        public virtual string Sku { get; set; }
        public virtual int PictureId { get; set; }
        public virtual string Description { get; set; }

        public virtual decimal Price { get; set; }

        public virtual int StockQuantity { get; set; }


        private ICollection<ProductVariantAttribute> _productVariantAttributes;



        /// <summary>
        /// Gets or sets the product identifier
        /// </summary>
        public virtual int ProductId { get; set; }

        /// <summary>
        /// Gets or sets the product
        /// </summary>
        public virtual Product Product { get; set; }
        /// <summary>
        /// Gets or sets the date and time of instance creation
        /// </summary>
        public virtual DateTime CreatedOnUtc { get; set; }

        /// <summary>
        /// Gets or sets the date and time of instance update
        /// </summary>
        public virtual DateTime UpdatedOnUtc { get; set; }

        /// <summary>
        /// Gets or sets the display order
        /// </summary>
        public virtual int DisplayOrder { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether the entity is published
        /// </summary>
        public virtual bool Published { get; set; }
        public virtual bool Deleted{ get; set; }



        public virtual ICollection<ProductVariantAttribute> ProductVariantAttributes
        {
            get { return _productVariantAttributes ?? (_productVariantAttributes = new List<ProductVariantAttribute>()); }
            set { _productVariantAttributes = value; }
        }


    }
}